package com.sandasai.action.admin;

import javax.annotation.Resource;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.opensymphony.xwork2.ActionSupport;
import com.sandasai.domain.Admin;
import com.sandasai.service.AdminManager;

@Controller
@Scope("prototype")
public class ShowAdminInfoAction extends ActionSupport {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@Resource
	private AdminManager adminManager;
	private int id;
	private Admin admin;
	private int page;
	
	public int getPage() {
		return page;
	}
	public void setPage(int page) {
		this.page = page;
	}
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public Admin getAdmin() {
		return admin;
	}
	public void setAdmin(Admin admin) {
		this.admin = admin;
	}
	
	public String execute() throws Exception{
		admin = this.adminManager.findByAdminId(id);
		System.out.println(admin.getRealName());
		return SUCCESS;
	}
}
